package com.amkai.aes.webservice.binary.objecthandler.ecm;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.amkai.aes.aescommon.service.diee.ReportManagerJob;
import com.amkai.aes.aescommon.service.diee.ReportManagerResult;
import com.amkai.aes.aescommon.service.ecm.EcmManagerJob;
import com.amkai.aes.aescommon.service.ecm.EcmManagerResult;
import com.amkai.aes.server.diee.ReportManagerProvider;
import com.amkai.aes.server.ecm.EcmManagerProvider;
import com.amkai.aes.webservice.binary.JobObjectHandler;

public class EcmManagerHandler implements JobObjectHandler<EcmManagerJob, Serializable, EcmManagerResult> {
	private static final Log logger = LogFactory.getLog(EcmManagerHandler.class);
			
	@Override
	public EcmManagerResult process(EcmManagerJob job, Serializable object) throws Exception {
		EcmManagerProvider em = new EcmManagerProvider();
		try {
			return em.processJob(job, object);
		} catch (Throwable e) {
			logger.error("EcmManagerHandler: ", e);
			throw new Exception(e);
		}
	}

}
